﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyArticle.aspx.cs" Inherits="newBlog.article.MyArticle" %>

<%@ Register Src="~/model/allLink.ascx" TagPrefix="uc1" TagName="allLink" %>

<%@ Import Namespace="newBlog.CenterInc.model" %>
<%@ Import Namespace="newBlog.CenterInc.Ctrltor" %>

<% 
   if (Session["user_id"]==null) {
        Response.Write("{\"error\":\"您未登录本站\"}");
        return;
    }
    
    catalog_inc catalog_Inc = new catalog_inc();
    List<catalog_Dao> list = catalog_Inc.Wrting();
    int Count = list.Count();
    int i = 0;


%>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的文章-<%=Application["title"] %></title>
    <meta name="description" content="<%=Application["content"] %>">
    <meta name="keywords" content="<%=Application["key"] %>">
    <uc1:allLink runat="server" ID="allLink" />
    <script src="/js/article/article.js?<%=DateTime.Now.ToString("yyyyMMddHHmmssffff") %>"></script>
</head>
<body>
    <div class="layui-row">
        <div class="layui-panel margin0 layui-clear">
            <div class="layui-row layui-col-space5 margin0">
                <div class="layui-col-md2" style="z-index: 1">
                    <div class="layui-input-inline left" style="width: 49%">
                        <input type="text" name="price_min" placeholder="￥" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid margin0" style="width: 2%">-</div>
                    <div class="layui-input-inline left" style="width: 49%;">
                        <input type="text" name="price_max" placeholder="￥" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md2 " style="z-index: 1">
                    <div class="layui-input-inline left" style="width: 100%">
                        <div class="layui-input-inline left" style="width: 49%">
                            <input type="text" class="layui-input" id="date_min" placeholder="时间间隔">
                        </div>
                        <div class="layui-form-mid margin0" style="width: 2%">-</div>
                        <div class="layui-input-inline left" style="width: 49%;">
                            <input type="text" class="layui-input" id="date_max" placeholder="时间间隔">
                        </div>
                    </div>
                </div>
                <script>
                    RenderDate('#date_min', 'date', false, 'yyyy-MM-ddTHH:mm:ss', '2015-01-01', 0, 'click');
                    RenderDate('#date_max', 'date', false, 'yyyy-MM-ddTHH:mm:ss', '2015-01-01', 0, 'click');
                </script>
                <div class="layui-col-md1 layui-form">
                    <select id="ArticleCatalog" lay-verify="" lay-search>
                        <option value="">目录</option>
                        <%
                            for (; i < Count; i++)
                            {
                        %>
                        <option value="<%=list[i].Id %>"><%=list[i].Name %></option>
                        <%
                            }
                        %>
                    </select>
                    <script>
                        RenderForm('select');
                    </script>
                </div>
                <div class="layui-col-md1">
                    <button type="button" class="layui-btn layui-btn-primary layui-border-blue layui-btn-fluid">筛选</button>
                </div>
                <div class="layui-col-md3 layui-col-md-offset1">
                    <input type="text" id="order_id" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-col-md1">
                    <button type="button" class="layui-btn layui-btn-primary layui-border-blue layui-btn-fluid" onclick="table_screening()">
                        <i class="layui-icon layui-icon-search"></i>
                    </button>
                </div>
                <div class="layui-col-md1">
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-fluid" onclick="window.location.reload()">
                        <i class="layui-icon layui-icon-refresh"></i>
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!--菜单栏-->
    <div class="layui-row RowSpace">
        <div class="layui-col-md10 layui-col-md-offset1">
            <div class="layui-panel margin0">
                <table id="ArticleList" lay-filter="ArticleList"></table>
                <!--文章列表-->
                <script>
                    RenderTable("#ArticleList", '', '/CenterInc/view_json/MyArticle_json.aspx', true, [[
                        { field: 'Id', title: 'ID', sort: true, fixed: 'left' }
                        , { field: 'Title', title: '标题', fixed: 'left' }
                        , { field: 'Price', title: '价格', sort: true }
                        , { field: 'Img', title: '封面', }
                        , { field: 'Catalog', title: '目录' }
                        , { field: 'Describe', title: '简介', width: 100 }
                        , { field: 'Time', title: '时间', sort: true }
                        , { field: 'right', title: '操作', fixed: 'right', toolbar: '#toolbar', sort: true }
                    ]], 20, '', '');
                    tabel_event();
                </script>
                <script type="text/html" id="toolbar">
                    <a class="layui-btn layui-btn layui-btn-danger  layui-btn-xs" lay-event="del">删除</a>
                    <a class="layui-btn layui-btn-normal  layui-btn-xs" lay-event="edit">编辑</a>
                </script>
            </div>
        </div>
    </div>
</body>
</html>
